Skip to content

Conversation

@AviaAv
Copy link
Contributor

@AviaAv AviaAv commented Nov 13, 2025

Tracked on: [LRS-1342]

@AviaAv AviaAv requested review from Nir-Az and Copilot November 13, 2025 15:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for filtering tests based on device connection type (e.g., USB, Ethernet). Tests can now use test:type <type> to require a specific connection type or test:type !<type> to exclude one.

  • Adds test:type directive parsing in test configuration
  • Implements connection type filtering in test execution logic
  • Exposes connection_type property on Device objects

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
unit-tests/run-unit-tests.py Adds logic to skip tests based on device connection type matching against required/excluded types
unit-tests/py/rspy/libci.py Adds types property to test configuration for storing connection type filters
unit-tests/py/rspy/devices.py Exposes connection_type property on Device class
unit-tests/live/metadata/test-usb-type-found.py Updates test to use new test:type USB directive instead of device exclusions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

for configuration, serial_numbers in devices_by_test_config( test, exceptions ):
# Currently, with all of our tests, serial_numbers holds a single serial number
# We will see multiple devices on serial_numbers only if the test specifies multiple devices in a
# single line. For example: "test:device D435 D455" will require both devices simultaneity
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'simultaneity' to 'simultaneously'.

Suggested change
# single line. For example: "test:device D435 D455" will require both devices simultaneity
# single line. For example: "test:device D435 D455" will require both devices simultaneously

Copilot uses AI. Check for mistakes.
elif directive == 'tag':
self._tags.update( map( str.lower, params )) # tags are case-insensitive
elif directive == 'type':
self._types.update( map( str.lower, params ))
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The type directive lacks consistency with the tag directive comment on line 246. Consider adding a similar inline comment explaining that types are case-insensitive, matching the pattern established for tags.

Suggested change
self._types.update( map( str.lower, params ))
self._types.update( map( str.lower, params )) # types are case-insensitive

Copilot uses AI. Check for mistakes.
@Nir-Az Nir-Az requested review from OhadMeir and removed request for Nir-Az November 17, 2025 10:07
@OhadMeir OhadMeir merged commit e497e49 into realsenseai:development Nov 17, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants